<?php

namespace App\Models\Dev;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use App\Models\Common\CommonModel;
class DevLog extends CommonModel
{
    use HasFactory;

    protected $table = 'dev_log';

    protected $appends = ['oper_type_name'];

    public function getDev(){
        return $this->hasOne(DevInfo::class,'id','dev_id');
    }

    public function getOperTypeNameAttribute(){
        return $this->oper_type==1?'安装':'回收';
    }
}
